<html>
<head><meta charset="utf-8"><title>const generic defaults · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html">const generic defaults</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221209761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221209761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221209761">(Dec 30 2020 at 12:42)</a>:</h4>
<p>I wonder whether it would be worth dedicating some time to finishing the implementation of const generic defaults in <a href="https://github.com/rust-lang/rust/pull/75384">https://github.com/rust-lang/rust/pull/75384</a>, and resolving the remaining questions re. parameter ordering, etc. This is a clearly useful feature that ought to be relatively straightforward to implement, and can be stabilised separately from the more advanced const generics features. We had put it off simply because it wasn't in the original RFC, but it would be easy to write a short amendment RFC when the feature is implemented.</p>



<a name="221209934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221209934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221209934">(Dec 30 2020 at 12:46)</a>:</h4>
<p>yeah, that seems like a good idea and probably won't even be too much work</p>



<a name="221209951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221209951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221209951">(Dec 30 2020 at 12:46)</a>:</h4>
<p>I'm going to take a closer look at Julian Knodt's progress, and see if I can iron out the remaining issues.</p>



<a name="221222049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221222049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221222049">(Dec 30 2020 at 15:55)</a>:</h4>
<p>I will try to help push this along a bit as well (knowing nothing about how const generics are implemented <span aria-label="sweat" class="emoji emoji-1f613" role="img" title="sweat">:sweat:</span>)</p>



<a name="221255412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255412">(Dec 30 2020 at 23:26)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="326189">@jknodt</span>: didn't spot you were on Zulip earlier</p>



<a name="221255448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255448">(Dec 30 2020 at 23:27)</a>:</h4>
<p>o yup I saw that you left some comments but haven't read them/updated the PR yet</p>



<a name="221255822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255822">(Dec 30 2020 at 23:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> is going to pull out your commits for the parsing changes to address <a href="https://github.com/rust-lang/rust/issues/80507">#80507</a> in the short term, and then we can figure out how to proceed after that.</p>



<a name="221255829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255829">(Dec 30 2020 at 23:34)</a>:</h4>
<p>More hands will make swifter work of the feature :)</p>



<a name="221255870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255870">(Dec 30 2020 at 23:35)</a>:</h4>
<p>Because now that I think about it more, defaults really behave badly from the user's perspective whenever const generics are involved at the moment, so it would be good to clean that up.</p>



<a name="221255949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221255949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221255949">(Dec 30 2020 at 23:36)</a>:</h4>
<p>(I'm almost done with it, just a few administrative points to fix and I'll open a PR)</p>



<a name="221256070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256070">(Dec 30 2020 at 23:38)</a>:</h4>
<p>sounds good, I'll look back at the PR and see if there's anything I can do in the meanwhile</p>



<a name="221256078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256078">(Dec 30 2020 at 23:38)</a>:</h4>
<p>I'm not a git wizard so I'm manually looking thru the commit you have in our repo on top of the changes &amp; adding them in</p>



<a name="221256171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256171">(Dec 30 2020 at 23:40)</a>:</h4>
<p>You should be able to pull my branch (GitHub has a button that gives you the command, I think), and then cherry pick my commit on to your branch.</p>



<a name="221256520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256520">(Dec 30 2020 at 23:47)</a>:</h4>
<p>oh wait is it just a branch &amp; not a separate fork? I was v confused for a bit</p>



<a name="221256618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256618">(Dec 30 2020 at 23:49)</a>:</h4>
<p>Ah, maybe GitHub doesn't make it so easy to pull a branch from a separate fork...</p>



<a name="221256707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256707">(Dec 30 2020 at 23:50)</a>:</h4>
<p>You can do it <a href="https://stackoverflow.com/questions/9153598/how-do-i-fetch-a-branch-on-someone-elses-fork-on-github">like this</a>, though by now you've probably copied the changes over manually :)</p>



<a name="221256729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221256729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221256729">(Dec 30 2020 at 23:51)</a>:</h4>
<p>lol I haven't finished it yet so I'll just do this</p>



<a name="221263055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263055">(Dec 31 2020 at 02:03)</a>:</h4>
<p>I've opened the PR <span class="user-mention" data-user-id="121053">@varkor</span> <a href="https://github.com/rust-lang/rust/pull/80547">https://github.com/rust-lang/rust/pull/80547</a></p>



<a name="221263135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263135">(Dec 31 2020 at 02:05)</a>:</h4>
<p>(I think/hope the slight modifications we discussed won't cause too much conflicts when rebasing <a href="https://github.com/rust-lang/rust/issues/75384">#75384</a>)</p>



<a name="221263473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263473">(Dec 31 2020 at 02:13)</a>:</h4>
<p>Looks good to me; I'll r+ when CI passes.</p>



<a name="221263484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263484">(Dec 31 2020 at 02:14)</a>:</h4>
<p>I'm not sure what else needs to be done for the feature gate (<code>const_generics</code> isn't in the unstable book IIUC), "procedurally", e.g. the github labels</p>



<a name="221263545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263545">(Dec 31 2020 at 02:14)</a>:</h4>
<p>I guess we overlooked that when <code>const_generics</code> was first being implemented.</p>



<a name="221263560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263560">(Dec 31 2020 at 02:15)</a>:</h4>
<p>I also may be wrong that this needs to be done ^^</p>



<a name="221263631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263631">(Dec 31 2020 at 02:16)</a>:</h4>
<p>but if someone knows what is usually done, I'll take care of it of course</p>



<a name="221263650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263650">(Dec 31 2020 at 02:17)</a>:</h4>
<p>There will be an automatic entry for <code>const_generics_defaults</code> – it just won't have a description. But I don't think that's a big issue, because there'll be a link to the tracking issue, and it's quite obvious what it means.</p>



<a name="221263702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263702">(Dec 31 2020 at 02:18)</a>:</h4>
<p>alright perfect then</p>



<a name="221263778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/const%20generic%20defaults/near/221263778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/const.20generic.20defaults.html#221263778">(Dec 31 2020 at 02:20)</a>:</h4>
<p>if CI fails (I've only ran the ui tests) I'll fix it tomorrow as it's getting quite late</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>